<?php 
error_reporting(0);
include_once("config.php");
$cid=$_GET['cid']?$_GET['cid']:'0';
if($cid){
	$add=" where s_cid='".$cid."'";
}else{
	$add="";
}

$result=mysql_query("select * from ".$prefix."shoplist ".$add." order by s_level desc limit 15");
while($arr=mysql_fetch_array($result)){
	$arr['s_clickurl'] = base64_encode(str_replace('mm_15252835_0_0',$userpid,$arr['s_clickurl']));
	if($arr['s_collect']==0){$arr['s_collect']= "∞";}
	$cat=mysql_query("select s_name from ".$prefix."shopcat where s_cid=".$arr['s_cid']);
	if($a=mysql_fetch_array($cat)){
		$arr['catname'] = $a['s_name'];
	}
	$shoplist[]=$arr;
}
$cache=false;
$smar=new MySmarty($cache,$cachetime,$moban);
$smarty=$smar->get_smarty();
$smarty->assign("shoplist",$shoplist);
$smarty->assign("website",$website);
$smarty->assign("prefixurl","huangguandianpu");
$smarty->assign("lcat",$lcat);
$smarty->assign("lpro",$lpro);
$smarty->assign("lpage",$lpage);
$smarty->assign("rewrite_postfix",$rewrite_postfix);
$smarty->assign("ljoin",$ljoin);


$smarty->display("recshop.html");
?>
